﻿<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
<div class="sw-container-support<?php echo " " . $moduleclass_sfx; ?>">
	<div class="care_header">
		<ul>
			<li><span class="care_title">Toll free:</span> <span class="care_line"><?php echo $params->get('phone'); ?></span></li>
			<li><span class="care_title">Hotline:</span> <span class="care_line"><?php echo $params->get('mobile'); ?></span></li>
		</ul>
	</div>
	<div class="care_main">
		<ul>
			<li>
				<?php
					/*function fetchURL($url) {
						if(!defined("ch")){
							function setupch(){
								$ch = curl_init();
								$c = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
								return($ch);
							}
							define("ch", setupch());
							
							function curl_get_contents($url){
								$c = curl_setopt(ch, CURLOPT_URL, $url);
								return(curl_exec(ch));
							}
						}
						return curl_get_contents($url);
						// return file_get_contents($url);
					}*/
				?>
				
				<?php
					
					/*$url_yh = 'http://opi.yahoo.com/online?u='.$params->get('yahoo'); 
					$data_yh = fetchURL($url_yh); 
					IF (TRIM(STRTOLOWER(STRIP_TAGS($data_yh))) != 'user not specified.') { 
						$status_yh = (STRLEN($data_yh) == 140) ? 'online' : 'offline'; 
					} ELSE { 
						$status_yh = TRIM(STRIP_TAGS($data_yh)); 
					} */
				
				?>
				<span class="care_yahoo">
					<a href="ymsgr:sendIM?<?php echo $params->get('yahoo'); ?>" class="online <?php //echo $status_yh; ?>"><?php echo $params->get('yahoo'); ?>
					</a>
				</span>
				
				
				<?php
					/*$data_skype = fetchURL('http://mystatus.skype.com/' . urlencode($params->get('skype')) . '.xml'); 
					$status_skype = strpos($data_skype, '<presence xml:lang="en">Offline</presence>') ? 'offline' : 'online'; */
				?>
				<span class="care_skype">
					<a href="skype:<?php echo $params->get('skype'); ?>?chat" class="online <?php //echo $status_skype; ?>">
						<?php echo $params->get('skype'); ?>
					</a>
				</span>
			</li>
			
			<li style="display: table;">
				<span class="care_title">Support:</span> 
				<span class="care_support">
					<?php echo $params->get('name'); ?>
				</span>
			</li>
		</ul>
	</div>
</div>
